package com.example.wx.controller;

import com.example.wx.modle.resp.WxPublicMessageTemplateRespDTO;
import com.example.wx.other.ResponseDTO;
import com.example.wx.service.WxPublicMessageTemplateService;
import com.vivo.it.vwkc.inventory.common.entity.request.CommonRequestPage;
import com.vivo.it.vwkc.inventory.common.entity.response.CommonResponsePage;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 微信公众号模板消息表
 *
 * @author ZhangBin
 * @date 2025-04-08 09:54:36
 * @Description:
 */
@Service
@RestController
@RequestMapping("/wxPublic/template")
public class WxPublicMessageTemplateController {
    @Autowired
    private WxPublicMessageTemplateService wxPublicMessageTemplateService;

    @ApiOperation("分页查询")
    @PostMapping("/queryPage")
    public ResponseDTO<CommonResponsePage<WxPublicMessageTemplateRespDTO>> queryPage(@RequestBody @Valid CommonRequestPage commonRequestPage){
        return ResponseDTO.success(wxPublicMessageTemplateService.queryPage(commonRequestPage));
    }
}
